import request from '@/utils/request'

// 获取路由
export const getRouters = () => {
  return request({
    url: '/system/auth/list-menus',
    method: 'get'
  })
}

// 获取好友
export const getFriend = data => {
  return request({
    url: '/friend/friendList',
    method: 'post',
    data: data
  })
}

// 获取聊天信息
export const getChatMsg = data => {
  return request({
    url: '/friend/chatMsg',
    method: 'post',
    data: data
  })
}

// 获取聊天信息
export const chatgpt = data => {
  return request({
    url: `https://api.openai.com/v1/completions`,
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': `Bearer xxxxx`,
    }
  })
}
